#include <iostream>
using namespace std;
    

int main()
{
    int a, b; cin >> a >> b;
    if(a % 2) swap(a, b);
    if(a > b) cout << 2 << endl;
    else cout << 1 << endl;
    return 0;
}
